package com.springcloud.alibaba.controller;

import com.springcloud.alibaba.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FlowController {

    @Autowired
    UserService userService;

    @GetMapping("/flow/read")
    public String flowRead(){
        return "读资源";
    }

    @GetMapping("/flow/write")
    public String flowWrite(){
        return "写资源";
    }

    @GetMapping("/user1")
    public String user1() {
        return userService.getUser();
    }

    @GetMapping("/user2")
    public String user2() {
        return userService.getUser();
    }
}
